<?php
ob_start(); 
$db = db::getInstance();
$form = $_POST['select_form'];
$attribut_nom = new DonneesModel();
$filter = array(new DFC(DonneesModel::FIELD_FORM_NAME, $form, DFC::EXACT));
$attribut_nom = DonneesModel::findByFilter($db, $filter, true);
foreach ($attribut_nom as $name) {
    $nom = $name->getFormName();
    $contenu_edit = $name->getEditSource();
}
echo '<html><head>
 <link rel="stylesheet" href="../views/css/validationEngine.jquery.css" type="text/css"/>
        <link rel="stylesheet" href="../views/css/style_menu.css" type="text/css"/>
        <link rel="stylesheet" href="../views/css/mini3537.css" type="text/css"/>
        <link rel="stylesheet" href="../views/css/template.css" type="text/css"/>
        <link rel="stylesheet" href="../views/css/mini74d5.css" type="text/css"/>
        <link rel="stylesheet" href="../views/css/reset.css" type="text/css" media="screen" title="no title" charset="utf-8">
        <link rel="stylesheet" href="../views/css/demo.css" type="text/css" media="screen" title="no title" charset="utf-8">
        <link rel="stylesheet" href="../views/css/simplemodal.css" type="text/css" media="screen" title="no title" charset="utf-8">
        <link rel="icon" type="image/png" href="../views/image/dynamic_form.png" />

        <!-- include script js -->
        <script type="text/javascript" src="../views/js/jquery-1.6.min.js"></script>
        <script type="text/javascript" src="../views/js/ddaccordion.js"></script>
        <script type="text/javascript" src="../views/js/menu.js"></script>
        <script src="../views/js/mootools-core-1.3.1.js" type="text/javascript" charset="utf-8"></script>
        <script src="../views/js/mootools-more-1.3.1.1.js" type="text/javascript" charset="utf-8"></script>
        <script src="../views/js/simple-modal.js" type="text/javascript" charset="utf-8"></script>
        <script src="../views/js/notifier.js" type="text/javascript" charset="utf-8"></script>
        <script type="text/javascript" src="../views/js/gf_scroll_div.js"></script>
        <script type="text/javascript" src="../views/js/jquery-ui-1.8.18.custom.min.js"></script>
        <script type="text/javascript" src="../views/js/drop.js"></script>
        <script src="../views/js/modernizr.custom.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="../views/js/script_fonctions2.js"></script> <script src="../views/js/notifier.js" type="text/javascript" charset="utf-8"></script>

<script>
$(document).ready(function(){
$("#name_form").attr("value","' . $nom . '");
$("#boutton_fct").text("Modifier");    
});
</script>
</head>
<body id="edit">';

echo $contenu_edit;
session_start();
$_SESSION['name'] = $form;

echo '</body> </html>';

?>
